<?php
$tpl['title'] = $language_pack['edit_film'];
include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/head.tpl');
?>
<body>
<script type="text/javascript" src="<?php echo $gSYSTEM_URL;?>templates/<?php echo $gTEMPLATE;?>/javascript/font-size.js">
</script>
<?php
include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/top-nav.tpl');
?>
<div id="wrapper">
	<?php
	include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/header.tpl');
	?>
    <h1><?php echo $language_pack['edit_film'];?></h1>
	<form action="../detail_save.php" method="post">
        <div id="info">
		    <fieldset>
		    	<legend><?php echo $language_pack['film_name'];?>：</legend>
		    	<?php
		    	$html_result = '';
		    	//print_r($written_language_tag_and_name);
		    	foreach($written_language_tag_and_name as $tag=>$name)
		    	{
					$html_result .='<span class="pl">'.$name.'['.$tag.']'.'：</span> <input type="text" name="film_name_'.$tag.'" value="'.$film_info['film_name'][$tag].'" /><br />'."\n";
		    	}
		    	echo $html_result;
		    	?>
		    </fieldset>
		    <span><span class="pl"><?php echo $language_pack['director'];?></span>： <input type="text" name="director" value="<?php echo $film_info['director'];?>" /></span><br />
		    <span><span class="pl"><?php echo $language_pack['screenwriter'];?></span>： <input type="text" name="screenwriter" value="<?php echo $film_info['screenwriter'];?>" /></span><br />
		    <span><span class="pl"><?php echo $language_pack['cinematographer'];?></span>： <input type="text" name="cinematographer" value="<?php echo $film_info['cinematographer'];?>" /></span><br />
		    <span><span class="pl"><?php echo $language_pack['cast'];?></span>： <textarea name="cast" cols="20" rows="5"><?php echo $film_info['cast'];?></textarea></span><br />
		    <div class="obmo">
				<span class="pl"><?php echo $language_pack['copyright_country'];?>：</span>
				<select name="country_id">
				
				<option value="">其他</option>
				<?php
				
					echo getOption($country_id_and_name,$film_info['country_id']);
				?>
				</select> <br />
				<span class="pl"><?php echo $language_pack['copyright_began_time'];?>：</span> <input type="text" name="copyright_began_time" value="<?php echo $film_info['copyright_began_time'];?>" /><br />
				<span class="pl"><?php echo $language_pack['copyright_type'];?>：</span>
				<select name="copyright_id">
				<?php
					echo getOption($copyright_id_and_name);
				?>
				<option value=""><?php echo $language_pack['other'];?></option>
				</select><br />
				<span class="pl"><?php echo $language_pack['is_copyright_expired'];?>：</span> 
				<select name="is_copyright_expired">
					<?php
					echo getOption($language_pack['is_copyright_expired_array'],$film_info['is_copyright_expired']);
					?>
				</select><br />
		    </div>
		    <div class="obmo">
				<span class="pl">douban<?php echo $language_pack['id'];?>： <input type="text" name="douban_id" value="<?php echo $douban_id;?>" readonly="readonly" /></span><br />
				<span class="pl">imdb<?php echo $language_pack['id'];?>： <input type="text" name="imdb_id" value="<?php echo $film_info['imdb_id'];?>" /></span><br />
		    </div>
		    <fieldset>
		    	<legend><?php echo $language_pack['film_rating'];?>：</legend>
		    	<?php
		    	foreach($language_pack['film_rating_array'] as $code=>$value_text)
		    	{
					echo $country_code_and_name[$code]."：";
					$name = 'film_rating_'.$code;
		    		echo getRadio($name,$value_text).'<br />';
				}
		    	?>
		    </fieldset>
		    <fieldset>
		    	<legend><?php echo $language_pack['audio_language'];?>：</legend>
		    	<?php
					$name = 'spoken_language_tag[]';
		    		echo getCheckbox($name,$spoken_language_id_and_name).'<br />';
		    	?>
		    </fieldset>
		    <input type="file" name="poster" /><br />
		    <input type="submit" value="<?php echo $language_pack['save'];?>" />
    	</div>
		<div class="clear">
		</div>
    </form>
	<?php
	include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/section/footer.tpl');
	?>
</div>
</body>
</html>
